AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Características específicas de WEBDEV / Mashup
  • Overview
  • Example: Retrieving a task list from a Google calendar
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Handling external JavaScript objects from WLanguage
Overview
The WLanguage in "Browser" mode is used to interface with the Web APIs such as the ones proposed by Google or Yahoo. The interaction with the external components proposed by these sites is simplified.
You have the ability to allocate external Javascript objects in browser code written in WLanguage.
The use of external JavaScript objects does not necessarily require the use of the JavaScript language: the programming can be done in WLanguage
Example: Retrieving a task list from a Google calendar
To retrieve a task list from a Google calendar:
  1. Include the programming interface of Google calendar in the page.
    • Display the "Advanced" tab of the page description.
    • In the "HTML" tab, add the following line of code into the HTML code of the page header:
      <script type="text/javascript">google.load("gdata", "1");</script>
      This code is supplied in the Google documentation.
    • In the "JavaScript" tab, click the "Add a Web resource" button. Enter the address used to include the calendar service:
      http://www.google.com/jsapi?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      (the code of the key corresponds to your personal code).
  2. Enter the browser code used to retrieve the task list:
    MyCalendarService is dynamic object
    MyCalendarService = new object "google.gdata.calendar.CalendarService"
    MyTasks is dynamic array
    MyTasks = MyCalendarService:feed:entry
    // Browse the array to fill the list
    FOR i = 1 TO Dimension(MyTasks)
    ListAdd(LIST_Task_Choice, MyTasks[i]:getTitle():getText())
    END
Versión mínima requerida
  • Versión 14
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/05/2022

Señalar un error o enviar una sugerencia | Ayuda local